#include "stack.h"
int stack::numObjects = 0;

stack::stack(const int size)
{
  count = 0;
  data = new int[size];
  stackSize = size;
}

stack::~stack()
{
  delete data;
}

void stack::push(int item)
{
  data[count] = item;
  count++;
}

int stack::pop()
{
  count--;
  return data[count];
}
